﻿function SubapprovalButtonFun(gridClientID, approvalMenuName, approvalPageName, approvalID) {
    var rowId;
    var grid = F(gridClientID);
    if (!rowId) {
        var selectedRowIds = grid.getSelectedRows();
        if (!selectedRowIds.length) {
            F.alert('请至少选择一项！');
            return;
        }
        rowId = selectedRowIds[0];

        $.ajax({
            url: '/Code/SubApproval.ashx',
            type: 'POST',
            data: { 'approvalDataID': rowId, 'approvalMenuName': approvalMenuName, 'approvalPageName': approvalPageName, 'approvalID': approvalID},
            dataType: 'json',
            timeout: 50000,
            success: function (response) {
                alert(response.message);
            }

        });
    }
}